<!-- 成员授权编辑页面 -->
<include file="Public:header"/>
<div id="main-content">
	<div id="top-alert" class="fixed alert alert-error" style="display: none;">
		<button class="close fixed" style="margin-top: 4px;">&times;</button>
		<div class="alert-content">警告内容</div>
	</div>
	<div id="main" class="main">
		<div class="main-title-h">
			<span class="h1-title">成员授权</span>
			<select name="group" class="navbar-btn  form-control select select-default select-sm" style="       height: 30px; width: 150px;min-width:150px;">
				<volist name="auth_group" id="vo">
					<option value="{:U('User/authUser',array('group_id'=>$vo['id'],'group_name'=>$vo['title']))}"
					<eq name="vo['id']" value="$this_group['id']">selected</eq>
					>{$vo.title}</option>
				</volist>
			</select>
		</div>
		<div class="data-table table-striped">
			<table class="">
				<thead>
				<tr>
					<th class="">ID</th>
					<th class="">username</th>
					<th class="">昵称</th>
					<th class="">最后登录时间</th>
					<th class="">最后登录IP</th>
					<th class="">状态</th>
					<th class="">操作</th>
				</tr>
				</thead>
				<tbody>
				<volist name="_list" id="vo">
					<tr>
						<td>{$vo.id}</td>
						<td>{$vo.username}</td>
						<td>{$vo.nickname}</td>
						<td><span>{$vo.last_login_time|time_format}</span></td>
						<td><span>{$vo.last_login_ip|long2ip}</span></td>
						<td>{$vo.status_text}</td>
						<td>
							<a href="{:U('User/authUserRemove?uid='.$vo['id'].'&group_id='.I('group_id'))}" class="ajax-get">解除授权</a>
						</td>
					</tr>
				</volist>
				</tbody>
			</table>
			<div class="page">
				<div>{$page}</div>
			</div>
			<table class="">
				<form class="add-user" action="{:U('User/authUserAdd')}" method="post" enctype="application/x-www-form-urlencoded">
					<input class="form-control input-4x" type="text" name="uid" placeholder="请输入uid,多个用英文逗号分隔" style="    display: initial;    padding-top: 0px;margin-right: 4px;">
					<input type="hidden" name="group_id" value="{:I('group_id')}">
					<button type="submit" class="btn btn-return ajax-post" target-form="add-user">新 增</button>
				</form>
			</table>
		</div>
	</div>
</div>
<include file="Public:footer"/>
<block name="script">
	<script type="text/javascript" charset="utf-8">
		$('select[name=group]').change(function () {
			location.href = this.value;
		});
		//导航高亮
		highlight_subnav("{:U('User/auth')}");
	</script>
</block>